﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FractalCreator.UI
{
	interface ITab
	{
		/// <summary>
		/// public getter function for History.  Used for loading the History sidebar when changing tabs.
		/// </summary>
		List<Computation.HistoryItem> History { get; }

		/// <summary>
		/// Used when the user selects a History item to revert to.  Loads item.
		/// </summary>
		/// <param name="item">Fractal to be loaded</param>
		void LoadHistoryItem(Computation.HistoryItem item);

		MainWindow ParentHandle { set; }

		

		//Events are essentially for objects to be passed (at an arbitrary time) from ITab to MainWindow.  Used for events that happen
		//within the ITab that the MainWindow needs to know about.
		/// <summary>
		/// Used for spawning a new ITab from another.  Examples: Create Julia from Mandelbrot, and launch recent file from Start tab.  
		/// This event is raised, it broadcasts in the MainWindow, which calls a method creating a new ITab with the contained Computation.Fractal.
		/// </summary>
		event FractalCreator.EventHandlerDefs.FractalEventHandler FractalSpawned;

		/// <summary>
		/// An event happens in the ITab changing the current parameters of the Fractal.  This event is then raised to represent adding
		/// a history item to the list on our sidebar.
		/// </summary>
		event FractalCreator.EventHandlerDefs.HistoryItemEventHandler AddHistoryItem;

		/// <summary>
		/// Haven't figured out a use for this yet, but here it is anyway.  Just in case.
		/// </summary>
		event FractalCreator.EventHandlerDefs.HistoryItemEventHandler RemoveHistoryItem;


		
	}
}
